package com.sp.scmdb.webservice.suport;

import java.io.InputStream;
import java.util.Properties;

import org.apache.commons.lang.StringUtils;

import com.sp.scmdb.common.CommonParamter;

public class InitUploadIndentity {

	public static boolean initIndentity() {
		try {
			Properties props = new Properties();
			InputStream in = Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("uploadIndentity.properties");
			props.load(in);
			String userID = props.getProperty("userID");
			String password = props.getProperty("password");
			if (StringUtils.isEmpty(userID) || StringUtils.isEmpty(password)) {
				return false;
			}
			CommonParamter.userID=userID;
			CommonParamter.password=password;
			return true;
		} catch (Exception e) {
			return false;
		}
	}
}
